Repository navigation
UI: File tab Backstage view (#174) - #331
Merged
Merged
Conversation
Clicking the File tab now opens a full-window Backstage view in place of the
ribbon, formula bar, grid and sheet tabs, like Excel's. Esc or the back arrow
return to the sheet. Pages: Home (new + recent), New (blank + samples), Open
(recent + Browse), Info (location, properties, Protect Workbook), Save, Save As,
Print (page preview, scope, fit to page, Page Setup), Export (PDF, CSV, web
page), Close and Options (theme, language, formula bar, AutoSave, calculation).
Every action runs an existing command or dialog.
Adds `file.options` (reports the workbook's calculation settings and asks the
interface for the Options page) and the UI command `ui.backstage {page}`.
Keyboard shortcuts and the macOS native menu are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
h-a-n-a-s-h-i
pushed a commit
that referenced
this pull request
Oct 11, 2026
…after #295) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Merged — thank you for the contribution! (I fixed Backstage › Options to read the formula-bar setting from engine prefs, since #295 moved it, and added Spanish/German/Czech strings for the new pages.) If you haven't already, come join us on the ArtCraft Discord: https://discord.gg/artcraft |
This was referenced Oct 11, 2026
arcanii
added a commit
to arcanii/DevCraft
that referenced
this pull request
Oct 12, 2026
Upstream is at 3926d21. Since the last merge it took in two of the fork's changes and built two more itself, so the fork stops carrying all four and uses upstream's: - The clear active cell (storytold#265) and the selection glide with View > Animations (storytold#266) were merged upstream. The fork's copies go: aniefork/selection.rs, the view.animations command, the hooks in grid.rs, control.rs, lib.rs and ribbon.rs. - Upstream built its own File page (storytold#331), with Save As, Print and Options pages, and closed ours (storytold#337) as a duplicate. aniefork/backstage.rs and its hooks go. - Upstream's File page has an Options page, and file.options opens it. The fork's Options dialog and its file.options command are retired. Its two own settings (the user name, Show the Developer tab) are now drawn on upstream's page through one hook, with the commands app.userName and developer.tab. The five conflicts were all at the fork's hooks. Upstream's version of each file was taken and the hooks the fork still needs were put back; ROADMAP-aniefork.md lists them. The fork now differs from upstream in nine of upstream's files, by about fifty lines, and in none of grid.rs. After the merge the fork's own tests pass, and fmt, clippy, assets, layers, wasm, keytips and parity pass. Three tests fail that upstream's main fails by itself, in files the fork doesn't touch: two CSV tests in the engine and the French catalog check in the UI crate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #174
What
The File tab used to open a five-item popup (New, Open, Save, Save As, Close). Excel's File tab opens the Backstage view: a full-window page that replaces the ribbon and sheet until you press Esc or click the back arrow. GridCraft now does the same.
crates/ui-egui/src/backstage.rs(new) draws a navigation column and the selected page below the title bar. The state is UI-only and never saved. Each action runs an existing command throughapp.runor opens an existing dialog:file.new)openpicker, native or web) + the full recent listreview.protectWorkbook), sheet count, editable properties (file.properties, committed when a field loses focus)saveAspathfile.print, same as the existing Print… menu item), active sheets or entire workbook, fit to one page, Page Setup… link, and a page preview with page navigation. The preview draws each page's cells at print scale inside the sheet's margins, usingfile.printPreviewpaginationfile.exportPdf), CSV (file.exportCsv), Web Page (file.exportHtml). Desktop goes through the save picker (the extension is set to the chosen format). Web downloads the filefile.close(the unsaved-changes prompt is kept)Commands:
file.options(new engine command; it was the one missing File command in the parity checklist). It returns{calculation: {mode, iterative, maxIterations, maxChange}}and pushesUiRequest::Dialog("options"), which the UI shows as the Options page. This is the same patternfile.openandfile.saveAsuse with empty params. It never changes the workbook. The catalog moves from 258 to 259 / 290 (cargo xtask parity).ui.backstage {page?}(UI command, listed inengine.commands).pageis one of home, new, open, info, saveAs, print, export, options, orclose.ui.inspectreports the open page asbackstage.ui.dialog {"name":"backstage","page":…}also works, so the snapshot example can render it with--dialog 'backstage={"page":"print"}'.Design decisions (from the task brief):
icons.rs. Colours come fromtheme::Tokens: the navigation uses the accent in light mode andaccent_softin dark mode.i18n.rs, zh, ko, ru, pt). "File" is translated too. Spanish has no interface catalog on main. The Options section labels useOptions|…context keys because "General" already means the number format.Tests
crates/ui-egui/tests/file_menu.rswas rewritten for the Backstage view:file.optionsopens Options, every page is reachable throughui.backstage, an unknown page is refused, and the back arrow closes the view.backstage.rsunit tests: page ids round-trip, recent-path splitting.file_options_reports_settings_and_asks_for_the_options_page(no workbook givesnull; it reports the settings, pushes the Options request and doesn't change the workbook).every_command_survives_empty_paramscovers the new command.Commands run (touched crates only):
Screenshots (our own offscreen snapshots, described)
I rendered these with
cargo run -p gridcraft-ui-egui --example snapshot -- --sample sales --dialog 'backstage={"page":"<page>"}' out.pngin light and dark, plus Japanese:Not done
file.printexactly like the existing Print… menu item. On the desktop that still doesn't reach a system print dialog (this was already the case). web: print straight to the system print dialog, not just export #209/web: print straight to the system print dialog, not just export #143 add a web print hook (print_now), and the button can switch to it when one of them lands.Unverified assumptions
plan/excel/observed-ui.mdwasn't available in this checkout, so spacing and colours are not compared against measurements.🤖 Generated with Claude Code